import Vue from "vue";
import Router from "vue-router";
import home from "../page/home";
import chooseFavor from "../page/chooseFavor.vue";
import showMovies from "../page/showMovies.vue";

import customer from "../page/customer/customer";
import customerInformation from "../page/customer/customerInformation";
import customerSquare from "../page/customer/customerSquare";
import searchPage from "../page/customer/searchPage.vue"
Vue.use(Router);

export default new Router({
    mode: "history",
    routes: [
        {
            path: '/',
            component: customer,
            children: [
                {
                    path: '',
                    redirect: 'customerSquare'
                },
                {
                    path: 'customerInformation',
                    component: customerInformation
                },
                {
                    path: 'customerSquare',
                    component: customerSquare
                }
                ,
                {
                    path: 'searchPage',
                    component: searchPage
                }
            ]
        },
        {
            path: '/home',
            name: 'home',
            component: home
        },
        {
            path: '/chooseFavor',
            name: 'chooseFavor',
            component: chooseFavor
        },
        {
            path: '/showMovies/:type',
            name: 'showMovies',
            component: showMovies
        },


    ]
});